const getRows = (req, res) => {
    let list = [];
    for(let num=1;num<11;num++){
        list.push({
            "id": num,
            "uid": 'hn9ye9uf9x8xq71ablmh',
            "loginName": num%5==0?"admin":'user000'+num,
            "userName": num%5==0?"管理员00"+num:"普通用户000"+num,
            "roleName": num%5==0?"平台管理员":"普及用户",
            "status": num%2==0?1:2,
            "remark": null,
            "gmtCreated": 1637212375526,
            "gmtModified": 1650972832731
        });
    }
    list.reverse();

    res.json ({
        success:true,
        errorCode:null,
        errorMessage:null,
        data:{
            rows:list,
            total:10
            
        },
        ts:1653544105
    })
}

export default {
    'GET /api/user/list':getRows,
    'GET /api/user/1':{
        success:true,
        errorCode:null,
        errorMessage:null,
        data:{
            "id": 1,
            "uid": 'hn9ye9uf9x8xq71ablmh',
            "loginName": "admin",
            "userName": "管理员001",
            "roleName": "平台管理员",
            "status": 2,
            "remark": null,
            "gmtCreated": 1637212375526,
            "gmtModified": 1650972832731
        },
        ts:1653544105
    },
    'POST /api/user':{
        success:true,
        errorCode:null,
        errorMessage:null,
        data:null,
        ts:1653544105
    },
    'PUT /api/user/1':{
        success:true,
        errorCode:null,
        errorMessage:null,
        data:null,
        ts:1653544105
    },
    'DELETE /api/user/1':{
        success:true,
        errorCode:null,
        errorMessage:null,
        data:null,
        ts:1653544105
    },
    'PUT /api/user/1/status/1':{
        success:true,
        errorCode:null,
        errorMessage:null,
        data:null,
        ts:1653544105
    },
}
